<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*"%>
<%@ page language="java"
	import="com.tangdi.production.mpapp.utils.WebPayServletUtil"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ page language="java"
	import="com.tangdi.production.mpapp.constants.*"%>
<%@ page import="java.text.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("on_back", "1");

	WebPayServletUtil payUtil = new WebPayServletUtil();
	
	String tp = request.getParameter("tp");
	if(StringUtils.isEmpty(tp)){
		tp = "1";
	}
	String param = request.getParameter("param");
	if(StringUtils.isEmpty(param)){
		param = "";
	}
%>
<!DOCTYPE html>
<html lang="zh">
<base href="<%=basePath%>">
<head>
<title>正在跳转</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />

<%
	out.write("<script type=\"text/javascript\">");
	out.write("var tp='" + tp + "';");
	out.write("var param='" + param + "';");
	out.write("</script>");
%>

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/core-1.0.js"></script>
<script type="text/javascript" src="js/webpay/base.js" charset="UTF-8"></script>
<script type="text/javascript" src="js/jquery.base64.js" charset="UTF-8"></script>
<script type="text/javascript">
	function savaParamToCookie(param){
		if(!param){
			return false;
		}
		var sz = (param + "").split("&");
		for(var i=0;i<sz.length;i++){
			var p = sz[i];
			var p_sz = p.split("=");
			alert(p_sz[0]+ "=" +p_sz[1]);
			$.setCookie(p_sz[0],p_sz[1]);
		}
	}

	var unpack = "";
	try {
		unpack = $.base64.atob(param);
	} catch (e) {
		
	}
	if(tp == "1"){//实名认证
		savaParamToCookie(unpack);
		openUrl(BASE_PATH + "user/user_certification.jsp");
	}else if(tp == "2"){//绑卡
		savaParamToCookie(unpack);
		openUrl(BASE_PATH + "user/user_cardBunding.jsp");
	}
	
</script>




<!--[if lte IE 9]>
			<link rel="stylesheet" href="ace_v1.3/assets/css/ace-part2.css" class="ace-main-stylesheet" />
		<![endif]-->

<!--[if lte IE 9]>
		  <link rel="stylesheet" href="ace_v1.3/assets/css/ace-ie.css" />
		<![endif]-->



<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
		<script src="ace_v1.3/assets/js/html5shiv.js"></script>
		<script src="ace_v1.3/assets/js/respond.js"></script>
		<![endif]-->

<style type="text/css">
</style>
</head>
<body>
	正在跳转......
</body>
</html>
